<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/1/21
  Time: 11:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>二维码</title>
  </head>
  <script type="text/javascript" src="jquery.min.js"></script>
  <body>

  <button id="ss">生成二维码</button>
  <img alt="" src="">


  <script>
    $(function () {
        $("#ss").click(function () {
            var url = "GetTicket";
            $.get(url,function (ticket) {
                var src ="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+ticket;

                $("img").attr("src",src);
            })
        })

    })
  </script>
  </body>
</html>
